var formToSubmit = "#object_info_form";
var formbutton = "#submit_info";

$(document).ready(function() {

        switch (post_action) {
            case "EDIT":
                $(formbutton).removeAttr("disabled");
                break;
            case "NEW":

                break;
        }  

        submit_success = function (data, textStatus, xhr)
        {

            if(data.action==true){

                $(formToSubmit+' .status_info').html(alert_html(data.msg,'success')); 

                function action_delay(){              
                    //append links in tabs navigation
                    //appent_tabs_links(data.insert_id);
                }
                window.setTimeout(function() { action_delay(); }, 1001);
                $(formbutton).removeAttr("disabled");
            }else{

                $(formbutton).removeAttr("disabled");
                $(formToSubmit+' .status_info').html(alert_html(data.msg,'error'));
                $(formToSubmit).animate({
                        scrollTop:  $(formToSubmit+' .status_info').offset().top
                    }, 200);
            }
        }


});